<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>04购物车（商品详情进入）-确认订单-收货地址空状态</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<link href="css/public.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<script src="js/jquery-2.1.4.min.js"></script>
</head>
<body class="graybody">
<!-- header -->
<header class="header header_buyCar">
    <div class="header_left"><a href="#" class="returnico"></a></div>
    <div class="header_center fontcolor">编辑地址</div>
    <div class="header_right"><a href="#" class="fontcolor">完成</a></div>
</header>
<!-----地址内容------>
<div class="edit_addressBox">
	<div class="editAddress_list">
    	<span class="left_textSpan">收货人：</span>
    	<div class="left_input" ><input type="text" id=""/></div>
    </div>
	<div class="editAddress_list">
    	<span class="left_textSpan">手机号：</span>
    	<div class="left_input" ><input type="tel" onkeyup="this.value=this.value.replace( /\D/g,'')" onafterpaste="this.value=this.value.replace( /\D/g,'')" maxLength="11" id=""/></div>
    </div>
    <div class="editAddress_sel" id="takeadd"><span class="left_textSpan">省市区：</span><div class="text_address"></div></div>
	<div class="editAddress_list">
    	<span class="left_textSpan">详细地址：</span>
    	<div class="left_input" ><input type="text"  id=""/></div>
    </div>
    
</div>
<!-----弹框地址选择------>
<section class="selcitydiv" id="selcity">
	<div class="selcity">
    	<span class="cityclose" id="cityclose"></span>
    	<h4 class="selcityh4">所在地区</h4>
        <!--默认为请选择，展示地区
        <h5 class="selcityh5"><a>请选择</a></h5>-->
        <h5 class="selcityh5"><a class="sheng yellow">选择地区</a><a class="shi"></a><a class="qu"></a></h5>
        <div class="selcitylist">
        	<div class="sheng_ul">
                <a>河北省</a>
                <a>河北省</a>
                <a>北京市</a>
        	</div>
        	<div class="shi_ul" style="display:none">
                <a>石家庄</a>
                <a>邯郸</a>
                <a>北京市</a>
        	</div>
        	<div class="qu_ul" style="display:none">
                <a>某区1</a>
                <a>某区2</a>
                <a>海淀区</a>
        	</div>
        </div>
    </div>
</section>
<script type="text/javascript">
$(function(){
	//提交
	$("#takeadd").click(function(){
		$("#selcity").show();
	});
	$("#cityclose").click(function(){
		$("#selcity").hide();
	});
	// 地区选择
	var addressText=[];
	$(".selcityh5 a").click(function(){
		var indexA=$(this).index();
		$(this).addClass("yellow").siblings("a").removeClass("yellow");
		$(".selcitylist ul").eq(indexA).show().siblings("ul").hide();
		$(".selcityh5 a:gt("+indexA+")").html("");
		$(".selcitylist div").eq(indexA).show().siblings("div").hide()
	});
	//省
	$(".sheng_ul a").click(function(){
		$(".shi").html($(this).html());
		addressText=[];
		addressText[0]=$(this).html();
		$(".shi").addClass("yellow").siblings("a").removeClass("yellow");
		$(".shi_ul").show().siblings("div").hide();
	});
	//市
	$(".shi_ul").on("click","a",function(){ 
		addressText.length=2;
		addressText[1]=$(this).html();
		$(".qu").html($(this).html());
		$(".qu").addClass("yellow").siblings("a").removeClass("yellow");
		$(".qu_ul").show().siblings("div").hide();
	});
	//区
	$(".qu_ul").on("click","a",function(){
		addressText[2]=$(this).html();
		var address = addressText.join(" ");
		$("#selcity").hide();
		$(".text_address").html(address);
	});
	
})
</script>
</body>
</html>